<?php

// mbilling/BillingBundle/Entity/domains.php
namespace mbilling\BillingBundle\Entity;
use Doctrine\ORM\Mapping as ORM;
use Symfony\Component\Validator\Constraints as Assert;
use mbilling\BillingBundle\Validator\Constraints as mpanel;
/*
 * статусы домена:
 * 1)обычный
 * 2)служебный
 */
/**
 * @ORM\Entity
 */
class domains
{
    /**
     * @ORM\Id
     * @ORM\Column(type="integer")
     * @ORM\GeneratedValue(strategy="AUTO")
     */
    protected $id;
 
    /**
     * @ORM\Column(type="string", length=100)
     * @assert\NotBlank
     * @mpanel\Domain
     */
    protected $name;
    
    /**
     * @ORM\Column(type="string", length=45, nullable="TRUE")
     */
    protected $first_ns_server;
    
    /**
     * @ORM\Column(type="string", length=45, nullable="TRUE")
     */
    protected $second_ns_server;
    
    /**
     * @ORM\Column(type="integer", nullable="TRUE")
     * @assert\Type("numeric")
     */
    protected $order_id;
	
     /**
     * @ORM\Column(type="integer")
     * @assert\NotBlank
     * @assert\Type("numeric")
     */
    protected $zone_id;
	
    /**
     * @ORM\Column(type="integer")
     * @assert\NotBlank
     * @assert\Type("numeric")
     */
    protected $status_id;
    
    /**
     * @ORM\Column(type="integer")
     */
    protected $user_id;

    /**
     * @ORM\Column(type="boolean")
     */
    protected $is_active;
    
    /**
     * @ORM\Column(type="boolean")
     */
    protected $for_remove;
    
    /**
     * @ORM\Column(type="integer", nullable="TRUE")
     * @assert\Type("numeric")
     */
    protected $message_id;
    
    public function setId($id)
    {
        $this->id = $id;
    }
    public function getId()
    {
        return $this->id;
    }

    public function setName($name)
    {
        $this->name = $name;
    }
    public function getName()
    {
        return $this->name;
    }

    public function setFirstNsServer($first_ns_server)
    {
        $this->first_ns_server = $first_ns_server;
    }
    public function getFirstNsServer()
    {
        return $this->first_ns_server;
    }

    public function setSecondNsServer($second_ns_server)
    {
        $this->second_ns_server = $second_ns_server;
    }
    public function getSecondNsServer()
    {
        return $this->second_ns_server;
    }

    public function setOrderId($order_id)
    {
        $this->order_id = $order_id;
    }
    public function getOrderId()
    {
        return $this->order_id;
    }

    public function setZoneId($zone_id)
    {
        $this->zone_id = $zone_id;
    }
    public function getZoneId()
    {
        return $this->zone_id;
    }

    public function setStatusId($status_id)
    {
        $this->status_id = $status_id;
    }
    public function getStatusId()
    {
        return $this->status_id;
    }

    public function setUserId($user_id)
    {
        $this->user_id = $user_id;
    }
    public function getUserId()
    {
        return $this->user_id;
    }
    
    public function setIsActive($is_active)
    {
        $this->is_active = $is_active;
    }
    public function getIsActive()
    {
        return $this->is_active;
    }
    
    public function setForRemove($for_remove)
    {
        $this->for_remove = $for_remove;
    }
    public function getForRemove()
    {
        return $this->for_remove;
    }
    
    public function setMessageId($message_id)
    {
        $this->message_id = $message_id;
    }
    public function getMessageId()
    {
        return $this->message_id;
    }
    
    public function initDefaultEntity()
    {
        $this->setName('domain');
        $this->setFirstNsServer('192.168.0.1');
        $this->setOrderId('0');
        $this->setZoneId('2');
        $this->setStatusId('1');
        $this->setUserId('1');
        return $this;
    }

    public function initGuestEntity()
    {
        $this->setName('guestdomain.ru');
        $this->setFirstNsServer('192.168.0.1');
        $this->setStatusId('2');
        return $this;
    }
}
?>
